home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.java,comp.lang.c++
- Path: in2.uu.net!allegra!alice!ark
- From: ark@research.att.com (Andrew Koenig)
- Subject: Re: Will Java kill C++?
- Message-ID: <DpyH85.6uu@research.att.com>
- Organization: AT&T Research, Murray Hill NJ
- References: <4ksfdr$bhh@engnews2.Eng.Sun.COM> <3172DC7C.6B3F@sdt.com> <4ku4lk$lg6@engnews2.Eng.Sun.COM>
- Date: Tue, 16 Apr 1996 12:55:17 GMT
-
- In article <4ku4lk$lg6@engnews2.Eng.Sun.COM> linden@positive.Sun.COM (Peter van der Linden) writes:
-
- > >How would you have maintained C-style linkage and C++ typesafe
- > >linkage in the same object module without changing the linker?
-
- > By writing a linker pre-pass program which checks for and enforces
- > the type-safe linking rules.
-
- But such a program (a) would have to be rewritten for every machine
- to which C++ was ported, and (b) would not solve the problem of what
- name to give the linker for overloaded functions with the same name.
-
- For example, suppose one translation unit has
-
- void f(int) { /* ... */ }
-
- and another has
-
- void f(double) { /* ... */ }
-
- These two translation units are compiled separately. When compiling C++
- into C, what names should the compiler give to the C versions of these functions
- so that your hypothetical prelinker will be able to tell them apart?
- --
- --Andrew Koenig
- ark@research.att.com
-